<!DOCTYPE html>
<html>
    <head>
        <!-- 加载样式及META信息 -->
        {include file="common/meta" /}
    </head>
    <body class="hold-transition {$Think.config.fastadmin.adminskin|default='skin-black-blue'} sidebar-mini {:$Think.cookie.sidebar_collapse?'sidebar-collapse':''} fixed {:$Think.config.fastadmin.multipletab?'multipletab':''} {:$Think.config.fastadmin.multiplenav?'multiplenav':''}" id="tabs">

        <div class="wrapper">

            <!-- 头部区域 -->
            <header id="header" class="main-header">
                {if preg_match('/\/admin\/|\/admin\.php|\/admin_d75KABNWt\.php/i', url())}
                <div class="alert alert-danger-light text-center" style="margin-bottom:0;border:none;">
                    {:__('Security tips')}
                </div>
                {/if}

                {include file='common/header' /}
            </header>

            <!-- 左侧菜单栏 -->
            <aside class="main-sidebar">
                {include file='common/menu' /}
            </aside>

            <!-- 主体内容区域 -->
            <div class="content-wrapper tab-content tab-addtabs">
                {if $fixedmenu}
                <div role="tabpanel" class="tab-pane {:$referermenu?'':'active'}" id="con_{$fixedmenu.id}">
                    <iframe src="{$fixedmenu.url}?addtabs=1" width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling-x="no" scrolling-y="auto" allowtransparency="yes"></iframe>
                </div>
                {/if}
                {if $referermenu}
                <div role="tabpanel" class="tab-pane active" id="con_{$referermenu.id}">
                    <iframe src="{$referermenu.url}?addtabs=1" width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling-x="no" scrolling-y="auto" allowtransparency="yes"></iframe>
                </div>
                {/if}
            </div>

            <!-- 底部链接,默认隐藏 -->
            <footer class="main-footer hide">
                <div class="pull-right hidden-xs">
                </div>
                <strong>Copyright &copy; 2017-{:date("Y")} <a href="__PUBLIC__">{$site.name}</a>.</strong> All rights reserved.
            </footer>

            <!-- 右侧控制栏 -->
            <div class="control-sidebar-bg"></div>
            {include file="common/control" /}
        </div>

        <!-- 加载JS脚本 -->
        {include file="common/script" /}
    </body>
</html>
<video id="authen_audio" src="/assets/mp3/8378.mp3"  style="display:none"  controls="controls"></video>
<script type="text/javascript">
    var authen_count_setinterval;
    var is_play = false;
    window.onload=function(){
        var allauthen_total = {$authen_count_data.allauthen_total},
            userauthen_total = {$authen_count_data.userauthen_total},
            logoutauthen_total = {$authen_count_data.logoutauthen_total},
            userdepositrefund1_total = {$authen_count_data.userdepositrefund1_total},
            circleauthen_total = {$authen_count_data.circleauthen_total};

        setTimeout(function(){
            layer.confirm('是否开启声音提醒', {
                btn: ['确认开启', '暂不开启'],
            },
            function(index, layero){
                is_play = true;
                layer.close(index);
            },
            function(index){
                is_play = false;
                layer.close(index);
            });
            clearInterval(authen_count_setinterval);
            authen_count_setinterval = setInterval(function(){
                $.ajax({
                    url:"{:url('ajax/authen_count')}",
                    success:function(result){
                        var data = result.data;
                        $('.allauthen_total').text(data.allauthen_total);
                        $('.userauthen_total').text(data.userauthen_total);
                        $('.logoutauthen_total').text(data.logoutauthen_total);
                        $('.userdepositrefund1_total').text(data.userdepositrefund1_total);
                        $('.circleauthen_total').text(data.circleauthen_total);
                        if (parseInt(data.allauthen_total) > 0) {
                            notice_window();
                        }   
                    }
                });
            },5000);
        },1000);
    }
    function notice_window(){
        if (is_play) {
            document.getElementById("authen_audio").play();
        }
    }
</script>
